.class public Lde/dealdoktor/app/views/WrappingSlidingDrawer;
.super Landroid/widget/SlidingDrawer;
.source "WrappingSlidingDrawer.java"


# instance fields
.field private mTopOffset:I

.field private mVertical:Z


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 5
    .parameter "context"
    .parameter "attrs"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 20
    invoke-direct {p0, p1, p2}, Landroid/widget/SlidingDrawer;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 22
    const-string v3, "android"

    const-string v4, "orientation"

    invoke-interface {p2, v3, v4, v1}, Landroid/util/AttributeSet;->getAttributeIntValue(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 23
    .local v0, orientation:I
    const-string v3, "android"

    const-string v4, "topOffset"

    invoke-interface {p2, v3, v4, v2}, Landroid/util/AttributeSet;->getAttributeIntValue(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v3

    iput v3, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    .line 24
    if-ne v0, v1, :cond_0

    :goto_0
    iput-boolean v1, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mVertical:Z

    .line 25
    return-void

    :cond_0
    move v1, v2

    .line 24
    goto :goto_0
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 5
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 12
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/SlidingDrawer;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 14
    const-string v3, "android"

    const-string v4, "orientation"

    invoke-interface {p2, v3, v4, v1}, Landroid/util/AttributeSet;->getAttributeIntValue(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v0

    .line 15
    .local v0, orientation:I
    const-string v3, "android"

    const-string v4, "topOffset"

    invoke-interface {p2, v3, v4, v2}, Landroid/util/AttributeSet;->getAttributeIntValue(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v3

    iput v3, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    .line 16
    if-ne v0, v1, :cond_0

    :goto_0
    iput-boolean v1, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mVertical:Z

    .line 17
    return-void

    :cond_0
    move v1, v2

    .line 16
    goto :goto_0
.end method


# virtual methods
.method protected onMeasure(II)V
    .locals 10
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    .line 31
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v7

    .line 34
    .local v7, widthSpecSize:I
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v4

    .line 36
    .local v4, heightSpecSize:I
    const/high16 v6, 0x4000

    .line 37
    .local v6, widthSpecMode:I
    const/high16 v3, 0x4000

    .line 39
    .local v3, heightSpecMode:I
    if-eqz v6, :cond_0

    if-nez v3, :cond_1

    .line 40
    :cond_0
    new-instance v8, Ljava/lang/RuntimeException;

    const-string v9, "SlidingDrawer cannot have UNSPECIFIED dimensions"

    invoke-direct {v8, v9}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw v8

    .line 43
    :cond_1
    invoke-virtual {p0}, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->getHandle()Landroid/view/View;

    move-result-object v1

    .line 44
    .local v1, handle:Landroid/view/View;
    invoke-virtual {p0}, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->getContent()Landroid/view/View;

    move-result-object v0

    .line 45
    .local v0, content:Landroid/view/View;
    invoke-virtual {p0, v1, p1, p2}, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->measureChild(Landroid/view/View;II)V

    .line 47
    iget-boolean v8, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mVertical:Z

    if-eqz v8, :cond_3

    .line 48
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v8

    sub-int v8, v4, v8

    iget v9, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    sub-int v2, v8, v9

    .line 49
    .local v2, height:I
    invoke-static {v2, v3}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v8

    invoke-virtual {v0, p1, v8}, Landroid/view/View;->measure(II)V

    .line 50
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v8

    iget v9, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    add-int/2addr v8, v9

    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v9

    add-int v4, v8, v9

    .line 51
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I

    move-result v7

    .line 52
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v8

    if-le v8, v7, :cond_2

    invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v7

    .line 62
    .end local v2           #height:I
    :cond_2
    :goto_0
    invoke-virtual {p0, v7, v4}, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->setMeasuredDimension(II)V

    .line 63
    return-void

    .line 55
    :cond_3
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v8

    sub-int v8, v7, v8

    iget v9, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    sub-int v5, v8, v9

    .line 56
    .local v5, width:I
    invoke-virtual {p0}, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->getContent()Landroid/view/View;

    move-result-object v8

    invoke-static {v5, v6}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v9

    invoke-virtual {v8, v9, p2}, Landroid/view/View;->measure(II)V

    .line 57
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredWidth()I

    move-result v8

    iget v9, p0, Lde/dealdoktor/app/views/WrappingSlidingDrawer;->mTopOffset:I

    add-int/2addr v8, v9

    invoke-virtual {v0}, Landroid/view/View;->getMeasuredWidth()I

    move-result v9

    add-int v7, v8, v9

    .line 58
    invoke-virtual {v0}, Landroid/view/View;->getMeasuredHeight()I

    move-result v4

    .line 59
    invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v8

    if-le v8, v4, :cond_2

    invoke-virtual {v1}, Landroid/view/View;->getMeasuredHeight()I

    move-result v4

    goto :goto_0
.end method
